package runtime;

public class RuntimeDemo {

    public static void main(String[] args) throws Exception {
        Runtime runtime = Runtime.getRuntime();//获得runtime对象
        String [] cmd={"cmd","/C","javac HelloWorld.java"};
        System.out.println(runtime.availableProcessors());//返回处理器数量
        runtime.exec("notepad.exe");//打开记事本应用程序
        runtime.exec(cmd); //打开控制台窗口，调用javac命令编译java源程序。生成字节码文件。
        runtime.load("C:/Windows/System32/crypt32.dll");//加载系统加密动态链接库。

    }
}
